import React from "react"
import { basicIp, newHttpService } from "../../api/http"

//gb-system-set/poundName 磅单名称列表

export const getGbSystemSetPoundName = () => {
    const url = basicIp + "/gb-system-set/poundName"
    return newHttpService.getData(url)
}

//gb-system-set/rtspGet 

export const getGbSystemSetRtspGet = (data:{id:string}) => {
    const url = basicIp + "/gb-system-set/rtspGet"
    return newHttpService.getData(url,data)
}

//gb-system-set/catchGet 

export const getGbSystemSetCatchGet = (data:{id:string}) => {
    const url = basicIp + "/gb-system-set/catchGet"
    return newHttpService.getData(url,data)
}
// 磅房抬杆落杆
export interface IGbSystemSetTgLgParams {
    id: React.Key; // 磅房ID
    type: string; // 操作类型 1：抬杆 2：落杆
}
export const getGbSystemSetTgLg = (data:IGbSystemSetTgLgParams) => {
    const url = basicIp + "/gb-system-set/TgLg"
    return newHttpService.getData(url, data)
}
// 磅房状态切换
export interface IGbSystemSetSetGbStopParams {
    id: React.Key; // 磅房ID
    type: number; // 状态 	0 开启 1 关闭
}
export const getGbSystemSetSetGbStop = (data:IGbSystemSetSetGbStopParams ) => {
    const url = basicIp + "/gb-system-set/setGbStop"
    return newHttpService.getData(url, data)
}